package com.zoe.condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @Author Zoe
 * @Date: 2020/11/17
 * @Description
 */
public class MyImportSelect implements ImportSelector {
    /**
     *
     * @param annotationMetadata 当前标注@import注解类的所有信息
     * @return
     */
    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        // 返回导入的全类名,返回的全类名会被加载到容器中
        return new String[]{"com.zoe.bean.Yellow","com.zoe.bean.Blue"};
    }
}
